function varargout = getFields(st, fields)

varargout = cell(1, length(fields));
for i = 1 : length(fields)
    if isfield(st, fields{i})
        varargout{i} = st.(fields{i});
    end
end
